// 引入axios模块
const axios = require("axios");
// 服务器地址
axios.defaults.baseURL = "http://fitness.h5.itsource.cn:3701";

// token令牌
let token = localStorage.getItem("token");
if (token) {
	axios.defaults.headers.common["Authorization"] = "Bearer " + token;
}
// 暴露axios
module.exports = axios;
